<!DOCTYPE html>
<html>
<head>
    <?php include(__DIR__ . '/../Public/header.php'); ?>
    <style type="text/css">

    </style>
</head>
<body class="skin-black fixed">
<?php include(__DIR__ . '/../Public/nav.php'); ?>
<div class="wrapper row-offcanvas row-offcanvas-left">
    <?php include(__DIR__ . '/../Public/left.php'); ?>
    <aside class="right-side">
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <ul class="breadcrumb">
                        <li><a href="#"><i class="fa fa-home"></i> <?=L('ucenter',1)?></a></li>
                        <li class="active"><?=L('setting',1)?></li>
                    </ul>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="panel">
                        <div class="panel-body">
                            <div class="alert alert-warning "><a href="#personal" data-toggle="modal" style='display:block;'> <?=L('personal',2)?> <i class="fa fa-pencil pull-right"></i></a></div>
                            <div class="alert alert-info "><a href="#changePwd" data-toggle="modal" style='display:block;'><?=L('change_password',2)?> <i class="fa fa-pencil pull-right"></i></a></div>
                        </div>
                    </div>
                </div>
            </div>
        <!-- row end -->
        </section><!-- /.content -->

        <?php include(__DIR__ . '/../Public/copyright.php'); ?>
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->

<div aria-hidden="true" role="dialog" tabindex="-1" id="personal" class="modal fade">
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
                <h4 class="modal-title"><?=L('personal',2)?></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal user-personal-form" data-action='<?=url('ucenter/personal')?>' role="form" onsubmit="return false;">
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('nick',2)?></label>
                        <div class="col-lg-10">
                            <input type="text" class="form-control" name='info[nick]' id='nickInput' data-rule-required="true" value="<?=$user['nick']?>" placeholder="<?=L('nick',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('name',2)?></label>
                        <div class="col-lg-10">
                            <input type="text" class="form-control" name='info[name]' id='nameInput' data-rule-required="true"  value="<?=$user['name']?>" placeholder="<?=L('name',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('birthday',2)?></label>
                        <div class="col-lg-10">
                            <input type="text" class="form-control" name='info[birthday]' id='birthdayInput' data-rule-required="true"  value="<?=$user['birthday']?>" data-rule-dateISO="true" placeholder="1900-01-01">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('address',2)?></label>
                        <div class="col-lg-10">
                            <div id="global_location" class="row m-b-15">
                                <div class="col-lg-3"><select class="form-control country" name='info[country]' data-first-title="选择国家">
                                    <?php if($user['country']){ ?>
                                    <option value="<?=$user['country']?>" selected><?=$user['country']?></option>
                                    <?php } ?>
                                </select></div>
                                <div class="col-lg-3"><select class="form-control province" name='info[province]' data-required="true">
                                    <?php if($user['province']){ ?>
                                    <option value="<?=$user['province']?>" selected><?=$user['province']?></option>
                                    <?php } ?>
                                </select></div>
                                <div class="col-lg-3"><select class="form-control city" name='info[city]' data-required="true">
                                    <?php if($user['city']){ ?>
                                    <option value="<?=$user['city']?>" selected><?=$user['city']?></option>
                                    <?php } ?>
                                </select></div>
                                <div class="col-lg-3"><select class="form-control area" name='info[area]' data-required="true">
                                    <?php if($user['area']){ ?>
                                    <option value="<?=$user['area']?>" selected><?=$user['area']?></option>
                                    <?php } ?>
                                </select></div>
                            </div>
                            <input type="text" class="form-control" name='info[address]' id='addressInput' data-rule-required="true"  value="<?=$user['address']?>" placeholder="<?=L('address',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('phone',2)?></label>
                        <div class="col-lg-10">
                            <input type="text" class="form-control" name='info[phone]' id='phoneInput' data-rule-required="true" data-url-phoneUK='true'  value="<?=$user['phone']?>" placeholder="<?=L('phone',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-10">
                            <button type="submit" class="btn btn-danger"><?=L('ok',2)?></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<div aria-hidden="true" role="dialog" tabindex="-1" id="changePwd" class="modal fade">
    <style type="text/css">
        #codeInput-error{display:block;position:absolute;}
    </style>
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
                <h4 class="modal-title"><?=L('change_password',2)?></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal change-pwd-form" data-action="<?=url('ucenter/change_pwd')?>" role="form" onsubmit="return false;">
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('oldpwd',2)?></label>
                        <div class="col-lg-10">
                            <input type="password" class="form-control" name='info[oldpwd]' id='oldpwdInput' data-rule-required="true" placeholder="<?=L('oldpwd',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('pwd',2)?></label>
                        <div class="col-lg-10">
                            <input type="password" class="form-control" name='info[pwd]' id='pwdInput' data-rule-required="true" placeholder="<?=L('pwd',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('repwd',2)?></label>
                        <div class="col-lg-10">
                            <input type="password" class="form-control" name='info[repwd]' id='repwdInput' data-rule-required="true" placeholder="<?=L('repwd',2)?>">
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 col-sm-2 control-label"><?=L('code',2)?></label>
                        <div class="col-lg-10">
                            <div class="input-group">
                                <input type="text" class="form-control" name='info[code]' id='codeInput' data-rule-required="true" placeholder="<?=L('code',2)?>">
                                <span class="input-group-btn">
                                    <button type='button' class="btn btn-flat send_repwd_email" data-url="<?=url('ucenter/send_repwd_email')?>"><?=L('send_mail',2)?></button>
                                </span>
                            </div>
                        </div>
                        <br>
                        <br>
                        <br>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-10">
                            <button type="submit" class="btn btn-danger"><?=L('ok',2)?></button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<?php include(__DIR__ . '/../Public/footer.php'); ?>
<script src="<?=PUB_PATH?>default/js/jquery.cxselect.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
    $.cxSelect.defaults.url = '<?=PUB_PATH?>default/js/globalData.min.json';
    $('#global_location').cxSelect({
        selects: ['country', 'province', 'city', 'area'],
        nodata: 'none'
    });
})
</script>
</body>
</html>